Optimal. Leaf size=233 \[ -\frac {2 a \left (8 a^2 C+15 A b^2+7 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^3 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (8 a^2 C+3 b^2 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^3 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {8 a C \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^2 d}+\frac {2 C \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3050, 3023, 2752, 2663, 2661, 2655, 2653} \[ -\frac {2 a \left (8 a^2 C+15 A b^2+7 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^3 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (8 a^2 C+3 b^2 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^3 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {8 a C \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^2 d}+\frac {2 C \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 3023
Rule 3050
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx &=\frac {2 C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b d}+\frac {2 \int \frac {a C+\frac {1}{2} b (5 A+3 C) \cos (c+d x)-2 a C \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{5 b}\\ &=-\frac {8 a C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^2 d}+\frac {2 C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b d}+\frac {4 \int \frac {\frac {a b C}{2}+\frac {1}{4} \left (8 a^2 C+3 b^2 (5 A+3 C)\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^2}\\ &=-\frac {8 a C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^2 d}+\frac {2 C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b d}-\frac {\left (a \left (15 A b^2+8 a^2 C+7 b^2 C\right )\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^3}+\frac {\left (8 a^2 C+3 b^2 (5 A+3 C)\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{15 b^3}\\ &=-\frac {8 a C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^2 d}+\frac {2 C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b d}+\frac {\left (\left (8 a^2 C+3 b^2 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 b^3 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a \left (15 A b^2+8 a^2 C+7 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^3 \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \left (8 a^2 C+3 b^2 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^3 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 a \left (15 A b^2+8 a^2 C+7 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^3 d \sqrt {a+b \cos (c+d x)}}-\frac {8 a C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^2 d}+\frac {2 C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.93, size = 190, normalized size = 0.82 \[ \frac {-2 a \left (8 a^2 C+15 A b^2+7 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+2 (a+b) \left (8 a^2 C+15 A b^2+9 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+b C \sin (c+d x) \left (-8 a^2-2 a b \cos (c+d x)+3 b^2 \cos (2 (c+d x))+3 b^2\right )}{15 b^3 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.80, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {C \cos \left (d x + c\right )^{3} + A \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right ) + a}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.29, size = 892, normalized size = 3.83 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\cos \left (c+d\,x\right )\,\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )}{\sqrt {a+b\,\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________